import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/drama_type_all_entity.dart';

DramaTypeAllEntity $DramaTypeAllEntityFromJson(Map<String, dynamic> json) {
  final DramaTypeAllEntity dramaTypeAllEntity = DramaTypeAllEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    dramaTypeAllEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    dramaTypeAllEntity.name = name;
  }
  final int? ctime = jsonConvert.convert<int>(json['ctime']);
  if (ctime != null) {
    dramaTypeAllEntity.ctime = ctime;
  }
  return dramaTypeAllEntity;
}

Map<String, dynamic> $DramaTypeAllEntityToJson(DramaTypeAllEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['ctime'] = entity.ctime;
  return data;
}

extension DramaTypeAllEntityExtension on DramaTypeAllEntity {
  DramaTypeAllEntity copyWith({
    int? id,
    String? name,
    int? ctime,
  }) {
    return DramaTypeAllEntity()
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..ctime = ctime ?? this.ctime;
  }
}